home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / pxfaccess.z / pxfaccess
Encoding:
Text File  |  1998-10-30  |  4.2 KB  |  95 lines

  1. PXFACCESS(3F)                                          Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFAACCCCEESSSS - Checks the accessibility of a named file
  6.  
  7. SSYYNNOOPPSSIISS
  8.      CCHHAARRAACCTTEERR*_n _p_a_t_h
  9.      IINNTTEEGGEERR _i_l_e_n,, _i_a_m_o_d_e,, _i_e_r_r_o_r
  10.      CCAALLLL PPXXFFAACCCCEESSSS((_p_a_t_h,, _i_l_e_n,, _i_a_m_o_d_e,, _i_e_r_r_o_r))
  11.  
  12. IIMMPPLLEEMMEENNTTAATTIIOONN
  13.      UNICOS, UNICOS/mk, and IRIX systems
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      IEEE standard interface for FORTRAN 77
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  20.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  21.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  22.      7.2 F77 compiler.
  23.  
  24.      The PPXXFFAACCCCEESSSS subroutine uses the aacccceessss(2) system call to check the
  25.      accessibility of a named file.
  26.  
  27.      The value of _i_a_m_o_d_e indicates specific file permissions.  These file
  28.      permissions are checked against the current file permissions specified
  29.      for the file in _p_a_t_h.  If the _i_a_m_o_d_e permissions are allowed for the
  30.      file in _p_a_t_h, PPXXFFAACCCCEESSSS returns a zero in _i_e_r_r_o_r.  Otherwise, it
  31.      returns a nonzero value.
  32.  
  33.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  34.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  35.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  36.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  37.      IRIX, the default kind is KKIINNDD==44.
  38.  
  39.      The following is a list of valid arguments for this subroutine:
  40.  
  41.      _p_a_t_h      An input character variable or array element containing the
  42.                name of a file.
  43.  
  44.      _i_l_e_n      An input integer variable containing the length of _p_a_t_h in
  45.                characters.  If _i_l_e_n is zero, all trailing blanks are
  46.                removed before calling aacccceessss().
  47.  
  48.      _i_a_m_o_d_e    An input integer variable containing the integer value of
  49.                the symbolic constant for one or more of the following
  50.                permissions:  RR__OOKK, WW__OOKK, XX__OOKK, or FF__OOKK.  An integer value
  51.                for each of these symbolic constants is retrieved through
  52.                the use of PPXXFFCCOONNSSTT or IIPPXXFFCCOONNSSTT.  The integer values may be
  53.                combined through the use of a bitwise inclusive OORR function.
  54.  
  55.      _i_e_r_r_o_r    An output integer variable that contain zero if the
  56.                requested access is permitted or nonzero if the requested
  57.                access is not permitted.
  58.  
  59.      In addition to the errors returned by the aacccceessss(2) system call,
  60.      PPXXFFAACCCCEESSSS may return the following errors:
  61.  
  62.      EEIINNVVAALL    If _i_l_e_n is less than 0 or _i_l_e_n is greater than LLEENN((_p_a_t_h))
  63.  
  64.      EENNOOMMEEMM    If PPXXFFAACCCCEESSSS is unable to obtain memory to copy _p_a_t_h.
  65.  
  66. EEXXAAMMPPLLEESS
  67.           program test
  68.           character*(12) path
  69.           integer ilen, iamod, ierr
  70.           path = 'testfile'
  71.           iamod = 0
  72.           ilen = 0
  73.           ierr = 0
  74.           call pxfconst('R_OK',iamod,ierr)
  75.           if (ierr.ne.0) then
  76.               print *,'FAIL: error from pxfconst R_OK = ',ierr
  77.           else
  78.               print *,'PASS: No error from pxfconst R_OK = '
  79.           endif
  80.           ierr = 0
  81.           call pxfaccess(path,ilen,iamod,ierr)
  82.           if (ierr.ne.0) then
  83.               print *,'FAIL: error from pxfaccess = ',ierr
  84.           else
  85.               print *,'PASS: No error from pxfaccess = '
  86.           endif
  87.           end
  88.  
  89. SSEEEE AALLSSOO
  90.      aacccceessss(2)
  91.  
  92.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  93.      2165, for the printed version of this man page.
  94.  
  95.